{__NOLAYOUT__}
<div toplayer="1" class="prompt-pop pop-style4" style="z-index:{$zindex};" id="<?php echo $funcid;?>" url="<?php echo U('Trade/index'); ?>">

    <div class="title">
        <span class="pop-name">登记库链/客户线下信息</span>
        <a href="javascript:void(0);" onclick="$(this).parents('.prompt-pop').remove();_asr.closePopup('{$funcid}');" class="close iconfont">&#xe60d;</a>
    </div>

    <div class="pop-scroll">
        <div class="screening ">
            <form enctype="multipart/form-data" action="<?php echo U('OrgCustomer/index?func=save'); ?>" id="<?php echo "$funcid"; ?>-Search" method="post">
            <input type="hidden" name="<?php echo "$funcid"; ?>-last-url" id="<?php echo "$funcid"; ?>-last-url" value="<?php echo $__last_url; ?>" />
            <input type="hidden" name="funcid" value="<?php echo "$funcid"; ?>" />
            <input type="hidden" name="pfuncid" value="<?php echo "$pfuncid"; ?>" />
            <input type="hidden" name="id" value="<?php echo $search["id"]; ?>" />
            <input type="hidden" name="_lastchanged" value="<?php echo $search["lastchanged"]; ?>" />
            <ul class="form form-mod-new form-column2">
                <li class="per100">
                    <div class="unit-left"><span class="tit"> 库链 </span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <label class="pbtxt txt0" name="org_id" value="" verify="" tips="" reglux=""><?php echo $search['org_name']; ?></label>
                        </div>
                    </div>
                </li>
                <li class="per100">
                    <div class="unit-left"><span class="tit"> 客户 </span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <label class="pbtxt txt0" name="customer_id" value="" verify="" tips="" reglux=""><?php echo $search['customer_name']; ?></label>
                        </div>
                    </div>
                </li>
                <li class="per100">
                    <div class="unit-left"><span class="tit"> 线下ID <em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="local_id"  value="<?php echo $search['local_id']; ?>"  >
                        </div>
                    </div>
                </li>
                <li class="per100">
                    <div class="unit-left"><span class="tit"> 线下名称 <em class="abe-red mrg_5">*</em></span></div>
                    <div class="unit-mid">
                        <div class="textbox">
                            <input type="text" class="pbtxt txt0" name="local_name"  value="<?php echo $search['local_name']; ?>"  >
                        </div>
                    </div>
                </li>
                <li class="per100">
                    <div class="unit-left"><span class="tit"> 商品编码 </span></div>
                    <div class="unit-mid">
                        <div class="textbox" id="{$funcid}_status">
                            <span class="pdr_20"><input type="radio" name="status" value="0" <?php if($search['status'] == 0) :?> checked <?php endif; ?>>申请</span>
                            <span class="pdr_20"><input type="radio" name="status" value="1" <?php if($search['status'] == 1) :?> checked <?php endif; ?>>授权</span>
                        </div>
                    </div>
                </li>
            </ul>
            </form>
        </div>
    </div>
    <div class="pop-sub abe-txtc" >


        <input type="button" value="提交" class="btn btn-blue mrg_10 " onclick="return _asr.submit('<?php echo "$funcid"; ?>', '<?php echo "$funcid"; ?>-Search', '<?php echo U("/Home/OrgCustomer/index?func=save&id=$search[id]") ; ?>',''); " />

        <input type="button" value="取消" class="btn btn-org mrg_10 " onclick="$(this).parents('.prompt-pop').remove();_asr.closePopup('{$funcid}');" />
    </div>




</div>

<script>
    function <?php echo $funcid; ?>_chooseDate(o) {
        if($('.date').length>0)
            pickmeup('.date').destroy();
        $('.date').removeClass('date')
        $(o).addClass('date');
        pickmeup('.date', {
            format  : 'Y-m-d',
            date : $(o).val(),
            hide_on_select : true,
            locale : 'zh'
        }).show();
    }

    $('.calendar0,.calendar1').on('click',function(){
    <?php echo $funcid; ?>_chooseDate(this)
    });


    /***************************************************************************************/
    /* 前台页面初始化                                                                      */
    /***************************************************************************************/
    function <?php echo $funcid; ?>_init(_id){
        return ;
    }

    /***************************************************************************************/
    /* 前台页面清除                                                                      */
    /***************************************************************************************/
    function <?php echo $funcid; ?>_clearsearch(_frm){

        _asr.setvaluebyname(_frm,"trade_no", "" );
        _asr.setvaluebyname(_frm,"tx_date", "" );
        _asr.setvaluebyname(_frm,"tx_type", "" );
        _asr.setvaluebyname(_frm,"goods_no", "" );
        _asr.setvaluebyname(_frm,"buyer_id", "" );
        _asr.setvaluebyname(_frm,"goods_name", "" );
        _asr.setvaluebyname(_frm,"brand", "" );
        _asr.setvaluebyname(_frm,"style_info", "" );
        _asr.setvaluebyname(_frm,"producing_area", "" );
        _asr.setvaluebyname(_frm,"weight", "" );
        _asr.setvaluebyname(_frm,"price", "" );
        _asr.setvaluebyname(_frm,"amount", "" );
        _asr.setvaluebyname(_frm,"warehouse_code", "" );
        _asr.setvaluebyname(_frm,"contract_no", "" );
        _asr.setvaluebyname(_frm,"contract_date", "" );
        _asr.setvaluebyname(_frm,"delivery_no", "" );
        _asr.setvaluebyname(_frm,"delivery_company", "" );
        _asr.setvaluebyname(_frm,"delivery_carno", "" );
        _asr.setvaluebyname(_frm,"delivery_contact", "" );
        _asr.setvaluebyname(_frm,"delivery_phone", "" );
        _asr.setvaluebyname(_frm,"delivery_idcard", "" );
        _asr.setvaluebyname(_frm,"delivery_type", "" );
        _asr.setvaluebyname(_frm,"delivery_info", "" );
        _asr.setvaluebyname(_frm,"customer_msg", "" );
        _asr.setvaluebyname(_frm,"buyer_msg", "" );
        _asr.setvaluebyname(_frm,"remarks", "" );
        _asr.setvaluebyname(_frm,"buyer_name", "" );


        $("#{$funcid}").find(".selebtn").each(function(){
            $(this).find("a:eq(0)").click();
        });

        $("#{$funcid} .city-tags-new .sele-remove").click();
    }

    function <?php echo $funcid;?>_callback(param){
        _asr.closePopup('{$funcid}');
    }



    {:W('Summary/javascript',array('Trade'))}

</script>

